//
//  CYPopSelectView.h
//  CYPopSelectView
//
//  Created by 楼楚 on 16/6/2.
//  Copyright © 2016年 Chu Lou. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger, CYDirectionType)
{
/*
the position of popselectView relative to addViewbutton
 ❶   ❷   ❸
 
 ❹   btn  ❺
 
 ❻   ❼   ❽
 
 */
    CYTypeOfUpLeft,     // 上左❶
    CYTypeOfUpCenter,   // 上中❷
    CYTypeOfUpRight,    // 上右❸
    
    CYTypeOfLeft,     // 左❹
    CYTypeOfRight,    // 右❺
    
    CYTypeOfDownLeft,   // 下左❻
    CYTypeOfDownCenter, // 下中❼
    CYTypeOfDownRight,  // 下右❽
    
};

@protocol selectIndexPathDelegate <NSObject>

- (void)selectIndexPathRow:(NSInteger )index;

@end

@interface CYPopSelectView : UIView
@property (nonatomic,readwrite,strong) UIView * _Nonnull backgroundView;
//titleStringArray
@property (nonatomic,readwrite,strong) NSArray * _Nonnull titleArray;
//titleImageArray
@property (nonatomic,readwrite,strong) NSArray * _Nonnull imageArray;
@property (nonatomic, assign) CGFloat row_height;
// font
@property (nonatomic, assign) CGFloat fontSize;
// textColor
@property (nonatomic, strong) UIColor * _Nonnull titleColor;
// delegate
@property (nonatomic, assign) id <selectIndexPathDelegate> _Nonnull delegate;
//instancetype
- (instancetype _Nonnull)initWithOrigin:(CGPoint) origin
                                  Width:(CGFloat) width
                                 Height:(CGFloat) height
                                   Type:(CYDirectionType)type
                                  Color:( UIColor * _Nonnull ) color;
- (void)popView;
@end
